#include "udpClent.hpp"
#include <memory>

static void Usage(std::string proc)
{
    std::cout << "\nUsage:\n\t" << proc << "server_ip server_port\n\n";
}

int main(int argc, char *argv[])
{

    if (argc != 3)
    {
        Usage(argv[0]);
        exit(USAGE_ERR);
    }
    std::string serverip = argv[1];
    uint16_t serverport = atoi(argv[2]); // 字符型转换为uint16_t

    std::unique_ptr<Client> ucli(new Client(serverip, serverport));
    ucli->initClient();
    ucli->run();

    return 0;
}